from model import Model

class Picture(Model):
    def __init__(self, _dict):
        Model.__init__(self, _dict)
        
        self.name = _dict['name']
        self.description = _dict['description']
        self.fname = _dict['fname'] # secure file name get by secure_filename(_file.filename)
        self.order = _dict['order']
        self.created = _dict['created']
        
        # Associate fields
        self.category = _dict['category']
        self.item = _dict['item']

    def __repr__(self):
        return '<Picture %r>' % (self.name)

if __name__ == '__main__':
    # create table
    pass
